home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 24 / AACD 24.iso / AACD / Programming / imageio.lib / usr / Install-imageio.library next >
Text File  |  2001-01-03  |  11KB  |  341 lines

  1. ; Install imageio.library
  2. ; $VER: Install-imageio.library V1.0 (3.5.2000)
  3. ; © 2000 Paul Huxham
  4.  
  5. (set #catalog 0) ; english language is default
  6.  
  7. ; Find the current language
  8. (set #i 0)
  9. (while (set #thisfile (select #i
  10.         "english" "italiano" "deutsch" "español" "czech" "català" "dansk" "français"
  11.         "hrvatski" "nederlands" "norsk" "polski" "português"
  12.         "russian" "srpski" "suomi" "svenska" "ÃeÓtina"
  13.         ""))
  14.     (
  15.         (if (= @language #thisfile)
  16.             (
  17.                 (set #catalog #i)
  18.                 (set #catalogname #thisfile)
  19.             )
  20.         )
  21.         (set #i (+ #i 1))
  22.     )
  23. )
  24.  
  25. ; Query user for their language, using system as default
  26. (set #catalog
  27.     (askchoice
  28.         (prompt "Select your native language (language for installer)")
  29.         (help @askoptions-help)
  30.         (choices "English" "Italiano" "Deutsch" "Español" "Czech")
  31.         (default #catalog)
  32.     )
  33. )
  34.  
  35. ; Reset #catalogname as the user may have changed the language above
  36. (if (< #catalog 5)
  37.     (
  38.         (set #catalogname (select #catalog "english" "italiano" "deutsch" "español" "czech"))
  39.     )
  40. )
  41.  
  42. ; Some string defaults common for all languages
  43. (set #HOMEPAGE "http://mafeking.scouts.org.au/steeplesoftware")
  44. (set #BLANK "\n")
  45.  
  46.  
  47. ; ************************** English texts ******************************
  48. (set #INITIAL_MESSAGE
  49.   (cat "\nWelcome to the imageio.library installer\n\n\n"
  50.     "You can obtain updates and other information\nabout imageio.library from the homepage\n\n"
  51.     #HOMEPAGE)
  52. )
  53. (set #WRONG_INSTALLER_VERSION "\n\n\n\nYou need at least version 42.9 of Installer\nto install imageio.library")
  54. (set #WRONG_CPU "\n\n\n\nYou need a 68020 CPU or better\nto use imageio.library")
  55. (set #WRONG_OS_VERSION "\n\n\n\nYou need at least AmigaOS V2.0\nto use imageio.library")
  56. (set #INSTALLING "\nInstalling")
  57. (set #INSTALL_WHICH_VERSION "\nInstall version for which CPU?")
  58. (set #PROMPT_INSTALL_IMAGEIOPREFS "\nInstall imageio.library prefs?\n\n(Used to alter the loading formats and\nother parameters of image loading)")
  59. (set #INSTALLING_IMAGEIOPREFS "\nInstalling imageio.library prefs")
  60. (set #PROMPT_INSTALL_CATALOG "\nWhich language catalogs would you like to install?")
  61. (set #INSTALLING_CATALOG "\nInstalling ImageIOLibraryPrefs catalog")
  62. (set #UPDATES_AVAILABLE "\nYou can get the latest version\nof imageio.library from the homepage")
  63. (set #YES "Yes")
  64. (set #NO "No")
  65.  
  66. ; ************************** Italiano texts *****************************
  67. (if (= #catalog 1)
  68. (
  69. (set #INITIAL_MESSAGE
  70.   (cat "\nBenvenuto nell'installazione di imageio.library\n\n\n"
  71.      "Puoi ottenere gli aggiornamenti, la mailing list e altre informazioni\nsu imageio.library alla homepage\n"
  72.      #HOMEPAGE)
  73. )
  74. (set #WRONG_INSTALLER_VERSION "\n\n\n\nNecessiti almeno della versione 42.9 dell'Installer\nper installare imageio.library")
  75. (set #WRONG_CPU "\n\n\n\nNecessiti di una CPU 68020 o superiore\nper usare imageio.library")
  76. (set #WRONG_OS_VERSION "\n\n\n\nNecessiti almeno di AmigaOS V2.0\nper usare imageio.library")
  77. (set #INSTALLING "\nInstallazione")
  78. (set #INSTALL_WHICH_VERSION "\nInstall version for which CPU?")
  79. (set #PROMPT_INSTALL_IMAGEIOPREFS "\nInstallare preferenze per l'imageio.library?\n\n(Usata per alterare i formati di caricamento e\naltri paramentri del caricamento delle immagini)")
  80. (set #INSTALLING_IMAGEIOPREFS "\nInstallazione preferenze imageio.library in corso")
  81. (set #PROMPT_INSTALL_CATALOG "\nQuale catalogo della lingua desideri installare?")
  82. (set #INSTALLING_CATALOG "\nInstallazione catalogo ImageIOLibraryPrefs")
  83. (set #UPDATES_AVAILABLE "\nAggiornamenti di imageio.library e le librarie richieste\n\nsono disponibili sulla home page")
  84. (set #YES "Sì")
  85. (set #NO "No")
  86. )
  87. )
  88.  
  89. ; ************************** Deutsch texts ******************************
  90. (if (= #catalog 2)
  91. (
  92. (set #INITIAL_MESSAGE
  93.   (cat "\nWillkommen zur Installation von imageio.library\n\n\n"
  94.     "Updates, und weitere Information\nüber imageio.library gibt es auf der Homepage\n"
  95.     #HOMEPAGE)
  96. )
  97. (set #WRONG_INSTALLER_VERSION "\n\n\n\nSie benötigen mind. Version 42.9 des Installers\num imageio.library zu installieren")
  98. (set #WRONG_CPU "\n\n\n\nSie benötigen einen 68020 oder höher\num imageio.library ausführen zu können")
  99. (set #WRONG_OS_VERSION "\n\n\n\nSie benötigen mind. AmigaOS V2.0\num imageio.library ausführen zu können")
  100. (set #INSTALLING "\nInstalliert")
  101. (set #INSTALL_WHICH_VERSION "\nInstall version for which CPU?")
  102. (set #PROMPT_INSTALL_IMAGEIOPREFS "\nImageio.library Prefs installieren?\n\n(Zum Ändern des Ladeformats und\nanderer Parameter des Ladens von Bildern)")
  103. (set #INSTALLING_IMAGEIOPREFS "\nImageIOLibraryPrefs wird installiert")
  104. (set #PROMPT_INSTALL_CATALOG "\nWelche Sprachen wollen Sie installieren?")
  105. (set #INSTALLING_CATALOG "\nImageIOLibraryPrefs Sprachdatei wird installiert")
  106. (set #UPDATES_AVAILABLE "\nUpdates für imageio.library und den dazugehörigen libraries\n\ngibt es auf der Homepage")
  107. (set #YES "Ja")
  108. (set #NO "Nein")
  109. )
  110. )
  111.  
  112. ; ************************** Español texts ******************************
  113. (if (= #catalog 3)
  114. (
  115. (set #INITIAL_MESSAGE
  116.   (cat "\nBienvenido a la instalación de imageio.library\n\n\n"
  117.     "Podrás obtener actualizaciones, acceder a listas de correo y tener más información\nsobre imageio.library en la página web de Homepage\n"
  118.     #HOMEPAGE)
  119. )
  120. (set #WRONG_INSTALLER_VERSION "\n\n\n\nNecesitas al menos la versión 42.9 del Installer\npara instalar imageio.library")
  121. (set #WRONG_CPU "\n\n\n\nNecesitas un 68020 o superior\npara utilizar imageio.library")
  122. (set #WRONG_OS_VERSION "\n\n\n\nNecesitas al menos AmigaOS V2.0\npara utilizar imageio.library")
  123. (set #INSTALLING "\nInstalando")
  124. (set #INSTALL_WHICH_VERSION "\nInstall version for which CPU?")
  125. (set #PROMPT_INSTALL_IMAGEIOPREFS "\n¿Instalo imageio.library prefs?\n\n(Utilizada para los diferentes formatos y\notros parámetros de carga de imágenes)")
  126. (set #INSTALLING_IMAGEIOPREFS "\nInstalando preferencias de imageio.library")
  127. (set #PROMPT_INSTALL_CATALOG "\n¿Qué catalogos (lenguajes) quieres instalar?")
  128. (set #INSTALLING_CATALOG "\nInstalando catálogo de ImageIOLibraryPrefs")
  129. (set #UPDATES_AVAILABLE "\nLas actualizaciones de imageio.library y librerías necesarias\n\nestán disponibles en la página web de homepage")
  130. (set #YES "Sí")
  131. (set #NO "No")
  132. )
  133. )
  134.  
  135. ; ************************** Czech texts ******************************
  136. (if (= #catalog 4)
  137. (
  138. (set #INITIAL_MESSAGE
  139.   (cat "\nVítejte pêi instalaci programu imageio.library!\n\n\n"
  140.     "Dalîí informace, kontakt na ostatní uùivatele a aktualizace\nmûùete zdarma získat staùením z domovské stránky\n"
  141.     #HOMEPAGE)
  142. )
  143. (set #WRONG_INSTALLER_VERSION "\n\n\n\nK instalaci programu imageio.library\npotêebujete Installer V42.9 nebo vyîîí")
  144. (set #WRONG_CPU "\n\n\n\nKe spuîtëní programu imageio.library\npotêebujete alespoñ CPU68020 nebo lepîí")
  145. (set #WRONG_OS_VERSION "\n\n\n\nProgram imageio.library vyùaduje\nke spuîtëní AmigaOS V2.0")
  146. (set #INSTALLING "\nInstalace")
  147. (set #INSTALL_WHICH_VERSION "\nInstall version for which CPU?")
  148. (set #PROMPT_INSTALL_IMAGEIOPREFS "\nInstall imageio.library prefs?\n\n(Used to alter the loading formats and\nother parameters of image loading)")
  149. (set #INSTALLING_IMAGEIOPREFS "\nInstalace nastavení knihovny imageio.library")
  150. (set #PROMPT_INSTALL_CATALOG "\nKterý z pêekladû chcete nainstalovat?")
  151. (set #INSTALLING_CATALOG "\nInstalace pêekladu programu ImageIOLibraryPrefs")
  152. (set #UPDATES_AVAILABLE "\n\nAktualizace programu imageio.library a pêísluîných\n\nknihoven jsou dostupné z domovské stránky")
  153. (set #YES "Ano")
  154. (set #NO "Ne")
  155. )
  156. )
  157.  
  158.  
  159. ; ************************* Global procedures ***************************
  160. (procedure P_copylib lib destpath newlibname
  161.     (
  162.         (copylib
  163.             (prompt (cat (cat #INSTALLING " ") (fileonly newlibname)))
  164.             (help @copylib-help)
  165.             (newname newlibname)
  166.             (source lib)
  167.             (dest destpath)
  168.             (confirm)
  169.             (optional askuser)
  170.         )
  171.     )
  172. )
  173.  
  174.  
  175. ; *********************** imageio.library install
  176.  
  177. (if (< @installer-version (+ (* 65536 42) 9))
  178.     (abort #WRONG_INSTALLER_VERSION)
  179. )
  180.  
  181. (if (< (database "cpu") 68020 )
  182.     (abort #WRONG_CPU)
  183. )
  184.  
  185. (set os_version (/ (getversion "exec.library" (resident)) 65536))
  186. (if (< os_version 37)
  187.     (abort #WRONG_OS_VERSION)
  188. )
  189.  
  190. ; All essential version numbers are correct, continue installation
  191. (message #INITIAL_MESSAGE)
  192.  
  193. (complete 0)
  194.  
  195.  
  196. ; *********************** Sort out what the user has where
  197.  
  198. ; Establish CPU type
  199.  
  200. (set #ourcpu (database "cpu"))
  201.  
  202. (if (= #ourcpu "68020") (set #ourcpu 0))
  203. (if (= #ourcpu "68030") (set #ourcpu 0))
  204. (if (= #ourcpu "68040") (set #ourcpu 1))
  205. (if (= #ourcpu "68060") (set #ourcpu 2))
  206.  
  207. (complete 0)
  208.  
  209. ; *********************** Install imageio.library
  210.  
  211. (set #cpu_install
  212.     (askchoice
  213.         (help @askchoice-help)
  214.         (prompt #INSTALL_WHICH_VERSION)
  215.         (choices "68020" "68040" "68060")
  216.         (default #ourcpu)
  217.     )
  218. )
  219.  
  220. (set #entry (select #cpu_install "020" "040" "060" ""))
  221. (set #entry (cat "libs/imageio.library_" #entry))
  222.  
  223. (set @default-dest "Libs:")
  224.  
  225. (if (= @user-level 2) ;If expert user, ask directory
  226.     (
  227.         (set @default-dest
  228.             (askdir
  229.                 (prompt #SELECT_INSTALL_DIRECTORY)
  230.                 (help @askdir-help)
  231.                 (default @default-dest)
  232.             )
  233.         )
  234.     )
  235. )
  236.  
  237. (P_copylib #entry @default-dest "imageio.library")
  238.  
  239. (complete 70)
  240.  
  241. (if (=
  242.     (askchoice
  243.         (help @askchoice-help)
  244.         (prompt #PROMPT_INSTALL_IMAGEIOPREFS)
  245.         (choices #YES #NO)
  246.         (default 0)
  247.     )    0 )
  248.     (
  249.         (copyfiles
  250.             (prompt #INSTALLING_IMAGEIOPREFS)
  251.             (source "prefs")
  252.             (choices "ImageIOLibraryPrefs" "ImageIOLibraryPrefs.info" )
  253.         (help @copyfiles-help)
  254.             (dest @default-dest)
  255.             (files)
  256.             (noposition)
  257.             (optional askuser)
  258.             (confirm)
  259.         )
  260.  
  261.         (complete 80)
  262.  
  263.         ; *********************** Install locale catalog
  264.  
  265.  
  266.         (set #localedest "LOCALE:Catalogs")
  267.  
  268.         (if (<> #catalog 0)
  269.             (
  270.                 (set #localesrc 1) ; Defaults to first entry
  271.                 (set #i 0)
  272.                 (while (set #thiscat (select #i "italiano" "deutsch" "español" "czech" ""))
  273.                     (
  274.                         (if (= #catalogname #thiscat)
  275.                             (
  276.                                 (set #x #i)
  277.                                 (while (> #x 0)
  278.                                     (set #localesrc (* #localesrc 2))
  279.  
  280.                                     (set #x (- #x 1))
  281.                                 )
  282.                             )
  283.                         )
  284.  
  285.                         (set #i (+ #i 1))
  286.                     )
  287.                 )
  288.             )
  289.             (
  290.                 (set #localesrc 0)
  291.             )
  292.         )
  293.  
  294.         (set #installcat
  295.             (askoptions
  296.                 (prompt #PROMPT_INSTALL_CATALOG)
  297.                 (choices "Italiano" "Deutsch" "Español" "Czech")
  298.                 (default #localesrc)
  299.                 (help @askoptions-help)
  300.             )
  301.         )
  302.  
  303.         (set #i 0)
  304.         (while (< #i 4)
  305.             (set #x #i)
  306.             (set #y 1)
  307.  
  308.             (while (> #x 0)
  309.                 (set #y (* #y 2))
  310.  
  311.                 (set #x (- #x 1))
  312.             )
  313.  
  314.             (if (bitand #installcat #y)
  315.                 (
  316.                     (set #localecat (select #i "Italiano" "Deutsch" "Español" "Czech"))
  317.  
  318.                     (copyfiles
  319.                         (prompt (cat (cat #INSTALLING_CATALOG " " ) #localecat))
  320.                         (help @copyfiles-help)
  321.                         (source (tackon "prefs/catalogs" #localecat))
  322.                         (choices "ImageIOLibraryPrefs.catalog")
  323.                         (dest (tackon #localedest #localecat))
  324.                         (confirm)
  325.                         (optional askuser)
  326.                         (files)
  327.                     )
  328.                 )
  329.             )
  330.  
  331.             (set #i (+ #i 1))
  332.         )
  333.     )
  334. )
  335.  
  336. (complete 100)
  337.  
  338. ; *********************** Finished installation
  339.  
  340. (message (cat #UPDATES_AVAILABLE #BLANK #BLANK #HOMEPAGE))
  341.